package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    void insertFlavors(List<DishFlavor> flavors);

    /**
     * 批量删除口味
     * @param ids
     */
    void deleteByDishIds(List<Long> ids);

    /**
     * 从口味表查出 对应菜品的口味数据
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> selectByDishId(Long id);
    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> getByDishId(Long id);
}
